package _12super调用父类构造方法;

public class Demo {
    public static void main(String[] args) {
        Son s1 = new Son();
        Son s2 = new Son(5);
    }
}
class Father {
        public Father(){
            System.out.println("父类无参构造方法");
        }
        public Father(int i){
            System.out.println("父类带参构造方法");
        }
}

class Son extends Father {

        public Son(){
            super();
            System.out.println("子类无参构造方法");
        }

        public Son(int i){
            super(i);
            System.out.println("子类带参构造方法");
        }
}

